Skip to content

refactor(mqlaunch): de-layer git & release menu launchers into a lib (Step 11a)#45

Merged
MCamner merged 1 commit into
mainfrom
feat/monolith-delayer-git
Jul 5, 2026
Merged

refactor(mqlaunch): de-layer git & release menu launchers into a lib (Step 11a)#45
MCamner merged 1 commit into
mainfrom
feat/monolith-delayer-git

Conversation

@MCamner

@MCamner MCamner commented Jul 5, 2026

Copy link
Copy Markdown
Owner

What

Fifth slice of Step 11a (monolith de-layering, audit P4). Pull the git & release menu launchers out of terminal/launchers/mqlaunch.sh into mqlaunch/lib/git-menus.sh: open_git_menu, open_release_menu.

Both launch an external menu script (gitlaunch.sh / mq-release-menu.sh) and invalidate the cached dashboard header on return (a commit/stash/tag makes cached Git status stale).

  • Verbatim move, sourced back into the launcher's scope — still uses the ambient UI helpers, $BASE_DIR, and command -v-guarded mq_dashboard_cache_invalidate / release_menu_loop. No behavior change.
  • All callers resolve (main dispatch, command-mode, mq-main-menu).
  • Launcher: 1547 → 1479 lines. Since 11a began: 2082 → 1479, ~600 lines out across five libs.

Tests caught the move (safety net working)

Two existing contract tests referenced these functions by their old home and correctly failed:

  • test-mqlaunch.sh — "Git route uses gitlaunch"
  • dashboard-header-cache-smoke.sh — "…menus invalidate the cache on Back"

Both repointed to git-menus.sh. The contracts are unchanged, only the file that owns them.

Guard

Added the git-menus row to tests/monolith-delayer-smoke.sh — now 31 functions across 4 concern libs.

Deliberately out of scope

  • run_git_screen at the top of mqlaunch.sh is dead there — no live caller in the launcher graph; the live copy lives in tools/scripts/mqlaunch_desktop.sh. Not moved: dead code is a separate cleanup, not something to launder into a lib as if it were live.
  • run_github_repo_picker is live but a ~117-line picker — its own follow-up slice.

Verification

Full selftest suite green (145 shell files lint clean); shellcheck clean on the new lib; markdownlint clean; resolution smoke confirms both functions resolve after sourcing.

Part of the v2.0.0 runtime-authority track; 11a unblocks Step 12 (v1 removal).

🤖 Generated with Claude Code

…(P4 / Step 11a)

Fifth Step 11a slice. Pull the git and release menu launchers (open_git_menu,
open_release_menu) out of the mqlaunch.sh monolith into
mqlaunch/lib/git-menus.sh, sourced back into the launcher's scope. Both launch
an external menu script (gitlaunch.sh / mq-release-menu.sh) and invalidate the
cached dashboard header on return.

Verbatim move, no behavior change: still uses the ambient UI helpers, $BASE_DIR,
and command -v-guarded mq_dashboard_cache_invalidate / release_menu_loop; every
caller (main dispatch, command-mode, mq-main-menu) resolves because the lib
sources before dispatch. Launcher: 1547 → 1479 lines (~600 out since 11a began).

Two existing contract tests referenced these functions by their old home and
correctly failed on the move — repointed to git-menus.sh (git-route→gitlaunch
in test-mqlaunch.sh; cache-invalidation-on-Back in dashboard-header-cache-smoke).
The contracts are unchanged, only the file that owns them. Smoke CONCERNS row
added (31 functions across 4 libs); AUTHORITY_MAP and CHANGELOG updated.

Scoping note: run_git_screen at the top of mqlaunch.sh is dead there (no live
caller in the launcher graph; the live copy lives in
tools/scripts/mqlaunch_desktop.sh), so it is deliberately NOT moved here — dead
code is a separate cleanup, not something to launder into a lib as if live.
run_github_repo_picker is live but a ~117-line picker; its own follow-up slice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MCamner MCamner merged commit 44ea274 into main Jul 5, 2026
3 checks passed
@MCamner MCamner deleted the feat/monolith-delayer-git branch July 5, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant